package vfs.obj.association.impl;

import java.sql.Connection;
import vfs.obj.entity.VFSUser;
import vfs.obj.entity.VFSGroup;
import vfs.filter.VFSFilter;
import vfs.obj.association.VFSUserToGroup;
import vfs.persist.association.VFSUserToGroupManager;
import vfs.persist.association.impl.VFSUserToGroupManagerImpl;
import java.util.Iterator;

/**
 *
 * @author Matthew Eavenson <durandal@uga.edu>
 */
public class VFSUserToGroupImpl implements VFSUserToGroup{
    
    private VFSUserToGroupManager manager;
    
    public VFSUserToGroupImpl(Connection conn){
        manager = new VFSUserToGroupManagerImpl(conn);
    }
    
    @Override
    public Iterator<VFSUser> getUsers(VFSGroup group, VFSFilter filter){
        return manager.getUsers(group, filter);
    }
    
    @Override
    public Iterator<VFSGroup> getGroups(VFSUser user, VFSFilter filter){
        return manager.getGroups(user, filter);
    }
    
    @Override
    public void addUserToGroup(VFSUser user, VFSGroup group){
        manager.addUserToGroup(user, group);
    }
    
    @Override
    public void removeUserFromGroup(VFSUser user, VFSGroup group){
        manager.removeUserFromGroup(user, group);
    }
    
}
